namespace A {
  export const time: number = 1000
  export const fn = <T>(arg: T): T => {
    return arg
  }
  fn(time)
}

namespace B {
  export const time: number = 1000
  export const fn = <T>(arg: T): T => {
    return arg
  }
  fn(time)
}
console.log(A.time); //如果不用export导出时无法读取值的
B.time

//嵌套命名空间
namespace v {
  export namespace b {
    export class Vue {
      parm: string
      constructor(parm: string) {
        this.parm = parm
      }
    }
  }
}
let V = v.b.Vue
console.log(new V('1'));

//抽离命名空间
// export namespace c {
//   export const chou = 617
// }
// import {c} from './c.ts'
// console.log(c.chou); // 617

//简化命名空间
namespace D {
  export namespace F {
    export const R = 456
  }
}
import X = D.F.R
console.log(X);

//合并命名空间
namespace G {
  export const g = 7
}
namespace G {
  export const f = 9
}
// G.f G.g  //重名的命名空间会进行合并


